package com.cac.demo.dao.wmsDeliveryCoordinate;

import com.cac.demo.entity.materialScan.WmsDeliverPlanDTO;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface WmsDeliveryCoordinateDao {

    public  int deleteDtoId(String id);


    //创建协调单
    public int insertWmsDelCoordinate(@Param("map") HashMap map);
    //查询该条码是否有协调单
    public int searchIsCoordinate(@Param("map") HashMap map);

    //协调单查询
    public Page<List<HashMap>> searchWmsDelCoordinate(@Param("bean") HashMap wmsDeliveryCoordinateDTO, @Param("startTime") Date startTime, @Param("endTime") Date endTime);

    //提交归零申请
    public int updateWmsDeliveryCo(@Param("map") Map map);

    //归零
    public int updateToZeroWmsDeliveryCo(@Param("map") Map map);

    //交接单查询
    public Page<List<HashMap>> searchDeliver(@Param("bean") WmsDeliverPlanDTO wmsDeliverPlanDTO);

    //发起协调
    public HashMap sendMessageToGK(String wmsDeliveryCoordinateId);

    //查询协调单状态
    public Integer searchStatus(String wmsDeliveryCoordinateId);

    //查询协调问题类型
    public List<HashMap> searchProblemType();

    int queryIsNoInvDelivery(@Param("map") HashMap map);

    int searchIsBzj(@Param("map") HashMap map);
}
